#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"

int testSmithyEffect(struct gameState *state) {
	int handCnt;
	//put smithy in hand and something else after it (so it can shift in to verify smithy left)
	state->hand[0][1] = smithy;
	state->hand[0][2] = village;
	handCnt = state->handCount[0];
	//play smithy
	cardEffect(smithy, 0, 0, 0, state, 1, 0);
	//check that smithy is no longer in that position
	assert(smithy != state->hand[0][1]);
	printf("\tCard removed");
	//handCount should be 2 greater than before
	assert(state->handCount[0] == handCnt +2);
	printf("\thandCount changed correctly\n");
	return 0;
}

int main() {
    
    int seed = 1000;
    int numPlayer = 3;
    
	struct gameState G;
	struct gameState *state = &G;
	int k[10] = {council_room, smithy, steward, remodel, village, minion, mine, cutpurse, 
		   sea_hag, tribute};

	initializeGame(numPlayer, k, seed, &G);
	printf("Testing smithyEffect():\n");
	testSmithyEffect(state);
	
	printf("   smithyEffect() Passed all tests!\n");
	

    return 0;
}

